package com.meterhuang.thread.foobar;

import lombok.extern.slf4j.Slf4j;

/**
 * 不正确的示范demo
 *
 * @author meterhuang
 * @date 2021/09/08 17:49
 */
@Slf4j
public class FooBarPrintMain {

	public static void main(String[] args) throws InterruptedException {
		FooBarSynchronized fooBarSynchronized = new FooBarSynchronized(4);

		Thread t1 = new Thread(new PrintFooThread());
		Thread t2 = new Thread(new PrintBarThread());

		// 单线程，所以卡死
		fooBarSynchronized.foo(t1);
		fooBarSynchronized.bar(t2);
	}

}
